package com.spring.ocrm.web.dao;

import java.util.HashMap;
import java.util.List;

import com.spring.ocrm.web.model.Order;
import com.spring.ocrm.web.model.ReturnOrder;
import com.spring.ocrm.web.model.ReturnOrderDetail;

public interface OCRMMapper {

	int getProductStockinStatus(String id);
	int checkIsOverStock(String id);
	int insertStorehouseProduct(HashMap<String,Object> hm);
	int insertStockHistory(HashMap<String,Object> hm);
	int updateStorehouseProduct(String id);
	int updateProductStockin(String id);
	
	HashMap<String,Object> getProductStockoutStatus(String id);
	int checkIsOverStockOut(String id);
	int updateProductStockout(String id);
	int updateProductSaleableQty(String id);
	int insertStockOutHistory(HashMap<String,Object> hm);
	int updateProductStockoutStatus(String id);
	
	int getAllocateStatus(String id);
	int checkAllocateIsOverStockin(String id);
	int checkAllocateIsOverStockout(String id);
	int insertAllocatetStorehouseProduct(HashMap<String,Object> hm);
	int updateAllocateStorehouseProduct(String id);
	int insertAllocateOutHistory(HashMap<String,Object> hm);
	int insertAllocateInHistory(HashMap<String,Object> hm);
	int updateCrmStorehouseAllocate(String id);
	
	
	int insertReturnOrder(ReturnOrder ro);
	int insertReturnOrderDetail(ReturnOrderDetail rod);
	int insertProductStockin(HashMap<String,Object> hm);
	int insertProductStockinDetail(HashMap<String,Object> hm);
	int updateCrmReturnOrderStockinID(HashMap<String,Object> hm);
	
	HashMap<String,Object> getCrmReturnOrder(String id);
	int updateCrmReturnOrder(String id);
	
	String getReturnIDByRechargeApplicationID(String rechargeApplicationID);
	HashMap<String,Object> getReturnNeedRechargeCardIDs(String orderID);
	int deleteRechargecard(String rechargecardID);
	int deletecontract(String contractID);
	int deleteRechargecardApplication(String rechargeApplicationID);
	int deleteApplicationPackage(String crm_return_orderID);
	
	HashMap<String,Object> getReturnIDByMemberApplicationID(String id);
	
	int checkHasRecharge(String crm_return_orderID);
	
	int getReturnCount(String crm_return_orderID);
	int getCardCount(String applicationID);
	int deleteMembercardApplication(String applicationID);
	int deleteMembercard(String membercardID);
	
	int deleteCardDetail(String crm_return_orderID);
	
	List<Order> orderDetail(String orderID);
	String returnOrderNumber();
}
